/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CameraJPanel.java
 *
 * Created on Oct 6, 2010, 3:13:32 AM
 */

package raytracing.gui;

/**
 *
 * @author xin
 */
public class CameraJPanel extends javax.swing.JPanel {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/** Creates new form CameraJPanel */
    public CameraJPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        cameraLabel = new javax.swing.JLabel();
        eyeLabel = new javax.swing.JLabel();
        upLabel = new javax.swing.JLabel();
        targetLabel = new javax.swing.JLabel();
        fovLabel = new javax.swing.JLabel();
        aspectLabel = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        yEye = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        zEye = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        zTarget = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        yTarget = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        xTarget = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        xUp = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        yUp = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        zUp = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        fov = new javax.swing.JTextField();
        aspect = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        fdist = new javax.swing.JTextField();
        jRadioButtonPinhole = new javax.swing.JRadioButton();
        jRadioButtonThinlens = new javax.swing.JRadioButton();
        jLabel17 = new javax.swing.JLabel();
        xEye = new javax.swing.JTextField();
        lensr = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();

        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        cameraLabel.setText("Camera");

        eyeLabel.setText("eye");

        upLabel.setText("up");

        targetLabel.setText("target");

        fovLabel.setText("fov");

        aspectLabel.setText("aspect");

        jLabel7.setText("x:");

        yEye.setColumns(5);

        jLabel8.setText("y:");

        zEye.setColumns(5);

        jLabel9.setText("z:");

        zTarget.setColumns(5);

        jLabel10.setText("z:");

        yTarget.setColumns(5);

        jLabel11.setText("y:");

        xTarget.setColumns(5);

        jLabel12.setText("x:");

        xUp.setColumns(5);

        jLabel13.setText("y:");

        yUp.setColumns(5);

        jLabel14.setText("z:");

        zUp.setColumns(5);

        jLabel15.setText("x:");

        fov.setColumns(5);

        aspect.setColumns(5);

        jLabel16.setText("fdist (thinlens)");

        fdist.setColumns(5);

        buttonGroup1.add(jRadioButtonPinhole);
        jRadioButtonPinhole.setText("pinhole");

        buttonGroup1.add(jRadioButtonThinlens);
        jRadioButtonThinlens.setText("thinlens");
        jRadioButtonThinlens.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonThinlensActionPerformed(evt);
            }
        });

        jLabel17.setText("type");

        xEye.setColumns(5);
        xEye.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                xEyeActionPerformed(evt);
            }
        });
        
                lensr.setColumns(5);

        jLabel18.setText("lensr (thinlens)");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cameraLabel)
                    .addComponent(jLabel17)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(129, 129, 129)
                        .addComponent(jRadioButtonPinhole)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButtonThinlens))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(eyeLabel)
                            .addComponent(targetLabel)
                            .addComponent(upLabel)
                            .addComponent(fovLabel)
                            .addComponent(aspectLabel)
                            .addComponent(jLabel16)
                            .addComponent(jLabel18))
                        .addGap(25, 25, 25)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lensr, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(fdist, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(aspect, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addGap(3, 3, 3)
                                .addComponent(xUp, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel13)
                                .addGap(3, 3, 3)
                                .addComponent(yUp, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel14)
                                .addGap(3, 3, 3)
                                .addComponent(zUp, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jLabel12)
                                        .addGap(3, 3, 3)
                                        .addComponent(xTarget, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel11))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jLabel7)
                                        .addGap(3, 3, 3)
                                        .addComponent(xEye, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel8)))
                                .addGap(3, 3, 3)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(yEye, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(yTarget, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel10)
                                    .addComponent(jLabel9))
                                .addGap(3, 3, 3)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(zEye, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(zTarget, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(fov, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(cameraLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(eyeLabel)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(yEye, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(zEye, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(xEye, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(targetLabel)
                    .addComponent(jLabel12)
                    .addComponent(xTarget, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(yTarget, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(zTarget, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(upLabel)
                    .addComponent(jLabel15)
                    .addComponent(xUp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13)
                    .addComponent(yUp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14)
                    .addComponent(zUp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fovLabel)
                    .addComponent(fov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(aspectLabel)
                    .addComponent(aspect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(fdist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(lensr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(jRadioButtonThinlens)
                    .addComponent(jRadioButtonPinhole))
                .addContainerGap(31, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButtonThinlensActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonThinlensActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonThinlensActionPerformed

    private void xEyeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_xEyeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_xEyeActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JTextField aspect;
    protected javax.swing.ButtonGroup buttonGroup1;
    protected javax.swing.JTextField fov;
    protected javax.swing.JTextField xEye;
    protected javax.swing.JTextField xTarget;
    protected javax.swing.JTextField xUp;
    protected javax.swing.JTextField yEye;
    protected javax.swing.JTextField yTarget;
    protected javax.swing.JTextField yUp;
    protected javax.swing.JTextField zEye;
    protected javax.swing.JTextField zTarget;
    protected javax.swing.JTextField zUp;
    protected javax.swing.JTextField fdist;
    protected javax.swing.JTextField lensr;
    protected javax.swing.JRadioButton jRadioButtonPinhole;
    protected javax.swing.JRadioButton jRadioButtonThinlens;
    
    private javax.swing.JLabel aspectLabel;
    private javax.swing.JLabel cameraLabel;
    private javax.swing.JLabel eyeLabel;
    private javax.swing.JLabel fovLabel;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel targetLabel;
    private javax.swing.JLabel upLabel;
    // End of variables declaration//GEN-END:variables

}
